/*
<Copyright (C) 2011 Dru Moore>

This file is part of demorecorder.

vlc-remote is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

demorecorder is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with demorecorder.  If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 1.1
import com.meego 1.0

PageStackWindow {
    id: demorecorder

    property bool recording: false
    property bool playing: false
    property bool projectLoaded: false
    property bool firstRun: true
    property string projectName: "Untitled"


    Component.onCompleted: {
        theme.inverted = true;
    }

    initialPage: recorderPage

    RecorderPage { id: recorderPage }
    MixerPage { id: mixerPage }
    EditorPage { id: editorPage }

    ToolBarLayout {
        id: commonTools
        visible: true

        ButtonRow {
            TabButton {
                id: tabRecorder
                iconSource: "file:///usr/share/themes/blanco/meegotouch/icons/icon-m-content-podcast-audio-inverse.png"
                onClicked: { myMenu.close(); pageStack.push(recorderPage); }
            }
            TabButton {
                id: tabMixer
                iconSource: "file:///usr/share/themes/blanco/meegotouch/icons/icon-m-toolbar-volume-white.png"
                onClicked: { myMenu.close(); pageStack.push(mixerPage); }
            }
            TabButton {
                id: tabEditor
                iconSource: "file:///usr/share/themes/blanco/meegotouch/icons/icon-m-toolbar-image-edit-white.png"
                onClicked: { myMenu.close(); pageStack.push(editorPage); }
            }
        }

        ToolIcon {
            platformIconId: "toolbar-view-menu";
            anchors.right: parent===undefined ? undefined : parent.right
            onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
        }
    }

    Menu {
        id: myMenu
        visualParent: pageStack
        MenuLayout {
            MenuItem { text: "Sample menu item" }
        }
    }
}
